<?php declare(strict_types=1);

namespace App\Constants;

class Business
{

    const CONTEXT_KEY_AUTH_ADMIN = 'AuthAdmin';         // 控制台-验证登录后绑定用户登录信息的上下文KEY

    const CACHE_RBAC_PREFIX = 'Cache:Rbac:User:';

    const EXCEPTION_RESPDATA = 'ExceptionData';

    const SMS_CODE_PREFIX = 'SMS:';                     // 短信验证码存储 key 前缀

    const SMS_EXPIRED_TIME = 600;                       // 短信验证码 有效时间

    const SMS_SCENE_LOGIN = 'login';
    const SMS_SCENE_BIND = 'bind';
    const SMS_SCENE_SIGNUP = 'signup';

    const SMS_SCENES = [
        self::SMS_SCENE_LOGIN,
        self::SMS_SCENE_BIND,
        self::SMS_SCENE_SIGNUP,
    ];

    const CONFIG_PREFIX = 'Config:';
    const CONFIG_FILE_DOMAIN_KEY = self::CONFIG_PREFIX . 'FileDomain';

    const CLIENT_ANDROID = 1;
    const CLIENT_IOS = 2;
    const CLIENT_H5 = 3;
    const CLIENT_MP_WX = 4;

    const CLIENT_OPTIONS = [
        self::CLIENT_ANDROID,
        self::CLIENT_IOS,
        self::CLIENT_H5,
        self::CLIENT_MP_WX,
    ];

    const PAY_METHOD_OTHERS = 0;        // 其他支付
    const PAY_METHOD_WECHAT = 1;        // 微信支付
    const PAY_METHOD_ALIPAY = 2;        // 支付宝支付
    const PAY_METHOD_WX_VIRTUAL = 3;    // 微信虚拟支付
    const PAY_METHOD_LENOVO = 4;        // 联想支付

}
